<template>
  <div class="ada-trial">
    <div>
      <span class="titleSty">已审阅</span>
    </div>
    <div class="homeworkList">
      <el-table
          :data="tableData"
          style="width: 100%;"
          height="12.5rem">
          <el-table-column type="expand">
            <template slot-scope="props">
              <el-form label-position="left" inline class="demo-table-expand">
                <el-form-item label="内容：">
                  <span>{{ props.row.content }}</span>
                </el-form-item>
                <el-form-item label="创建时间：">
                  <span>{{ props.row.create_date }}</span>
                </el-form-item>
              </el-form>
            </template>
          </el-table-column>
          <el-table-column
          label="日期"
          sortable
          prop="create_date">
          </el-table-column>
          <el-table-column
          label="科目"
          sortable
          prop="subject_name">
          </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import http from '../../../util/http';

  export default {

    data() {
      return {
        tableData: [],
      };
    },
    methods: {
      getQuestionList() {
        http.get(`/questionAPI/getListByChecked?sid=${window.localStorage.getItem('userId')}`)
        .then((res) => {
          this.tableData = res.resultMap.checkedList;
        })
        .catch((error) => {
          console.log(error);
        });
      },
    },
    mounted() {
      this.getQuestionList();
    },
  };
</script>
<style scoped>
.ada-trial{
  margin: 0 0 0 2.5rem;
  width: 13rem;
}
.titleSty{
  color: white;
  font-size: .7rem;
  margin: 0 0 0 .5rem;
}
.homeworkList{
  box-shadow:.1rem .06rem .15rem #888;
  margin-top: .5rem;
}
.demo-table-expand .el-form-item {
  margin: auto;
  width: 90%;
}
</style>
